home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form RectForm
- AutoRedraw = -1 'True
- Caption = "Rectangle and RoundRect"
- ClientHeight = 4140
- ClientLeft = 1350
- ClientTop = 1770
- ClientWidth = 6690
- Height = 4830
- Left = 1290
- LinkTopic = "RectForm"
- ScaleHeight = 276
- ScaleMode = 3 'Pixel
- ScaleWidth = 446
- Top = 1140
- Width = 6810
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuFileExit
- Caption = "E&xit"
- End
- End
- Attribute VB_Name = "RectForm"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Form_Resize()
- Dim hgt As Integer
- Dim dh As Integer
- Dim wid As Integer
- Dim dw As Integer
- Dim ymid As Integer
- Dim xmid As Integer
- Dim i As Integer
- Dim s As Integer
- Dim round As Boolean
- Cls
- hgt = ScaleHeight * 0.1
- dh = ScaleHeight * 0.4 / 5
- wid = ScaleWidth * 0.5
- dw = -ScaleWidth * 0.4 / 5
- ymid = ScaleHeight / 2
- xmid = ScaleWidth / 2
- For i = 1 To 5
- If round Then
- s = RoundRect(hDC, xmid - wid, ymid - hgt, xmid + wid, ymid + hgt, 50, 30)
- Else
- s = Rectangle(hDC, xmid - wid, ymid - hgt, xmid + wid, ymid + hgt)
- End If
- round = Not round
-
- wid = wid + dw
- hgt = hgt + dh
- Next i
- Refresh
- End Sub
- Private Sub mnuFileExit_Click()
- Unload Me
- End Sub
-